Optimal. Leaf size=216 \[ -\frac {(75 B-163 C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {(B-C) \sec ^3(c+d x) \tan (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(9 B-17 C) \sec ^2(c+d x) \tan (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {(93 B-197 C) \tan (c+d x)}{24 a^2 d \sqrt {a+a \sec (c+d x)}}-\frac {(39 B-95 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{48 a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.50, antiderivative size = 216, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4157, 4104,
4095, 4086, 3880, 209} \begin {gather*} -\frac {(75 B-163 C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{16 \sqrt {2} a^{5/2} d}-\frac {(39 B-95 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{48 a^3 d}+\frac {(93 B-197 C) \tan (c+d x)}{24 a^2 d \sqrt {a \sec (c+d x)+a}}+\frac {(B-C) \tan (c+d x) \sec ^3(c+d x)}{4 d (a \sec (c+d x)+a)^{5/2}}+\frac {(9 B-17 C) \tan (c+d x) \sec ^2(c+d x)}{16 a d (a \sec (c+d x)+a)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 3880
Rule 4086
Rule 4095
Rule 4104
Rule 4157
Rubi steps
\begin {align*} \int \frac {\sec ^3(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{5/2}} \, dx &=\int \frac {\sec ^4(c+d x) (B+C \sec (c+d x))}{(a+a \sec (c+d x))^{5/2}} \, dx\\ &=\frac {(B-C) \sec ^3(c+d x) \tan (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {\int \frac {\sec ^3(c+d x) \left (3 a (B-C)-\frac {1}{2} a (3 B-11 C) \sec (c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx}{4 a^2}\\ &=\frac {(B-C) \sec ^3(c+d x) \tan (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(9 B-17 C) \sec ^2(c+d x) \tan (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {\int \frac {\sec ^2(c+d x) \left (a^2 (9 B-17 C)-\frac {1}{4} a^2 (39 B-95 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{8 a^4}\\ &=\frac {(B-C) \sec ^3(c+d x) \tan (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(9 B-17 C) \sec ^2(c+d x) \tan (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}-\frac {(39 B-95 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{48 a^3 d}+\frac {\int \frac {\sec (c+d x) \left (-\frac {1}{8} a^3 (39 B-95 C)+\frac {1}{4} a^3 (93 B-197 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{12 a^5}\\ &=\frac {(B-C) \sec ^3(c+d x) \tan (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(9 B-17 C) \sec ^2(c+d x) \tan (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {(93 B-197 C) \tan (c+d x)}{24 a^2 d \sqrt {a+a \sec (c+d x)}}-\frac {(39 B-95 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{48 a^3 d}-\frac {(75 B-163 C) \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx}{32 a^2}\\ &=\frac {(B-C) \sec ^3(c+d x) \tan (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(9 B-17 C) \sec ^2(c+d x) \tan (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {(93 B-197 C) \tan (c+d x)}{24 a^2 d \sqrt {a+a \sec (c+d x)}}-\frac {(39 B-95 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{48 a^3 d}+\frac {(75 B-163 C) \text {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{16 a^2 d}\\ &=-\frac {(75 B-163 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {(B-C) \sec ^3(c+d x) \tan (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(9 B-17 C) \sec ^2(c+d x) \tan (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {(93 B-197 C) \tan (c+d x)}{24 a^2 d \sqrt {a+a \sec (c+d x)}}-\frac {(39 B-95 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{48 a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.58, size = 161, normalized size = 0.75 \begin {gather*} \frac {\left (-6 \sqrt {2} (75 B-163 C) \tanh ^{-1}\left (\frac {\sqrt {1-\sec (c+d x)}}{\sqrt {2}}\right ) \cos ^4\left (\frac {1}{2} (c+d x)\right ) \sec ^2(c+d x)+\sqrt {1-\sec (c+d x)} \left (147 B-299 C+(255 B-503 C) \sec (c+d x)+32 (3 B-5 C) \sec ^2(c+d x)+32 C \sec ^3(c+d x)\right )\right ) \tan (c+d x)}{48 d \sqrt {1-\sec (c+d x)} (a (1+\sec (c+d x)))^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(794\) vs.
\(2(189)=378\).
time = 13.97, size = 795, normalized size = 3.68
method | result | size |
default | \(-\frac {\left (-1+\cos \left (d x +c \right )\right )^{2} \left (-225 B \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right )+489 C \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right )-675 B \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right )+1467 C \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right )-675 B \cos \left (d x +c \right ) \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right )+1467 C \cos \left (d x +c \right ) \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right )-225 B \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sin \left (d x +c \right )+489 C \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \ln \left (-\frac {-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+\cos \left (d x +c \right )-1}{\sin \left (d x +c \right )}\right ) \sin \left (d x +c \right )+588 B \left (\cos ^{4}\left (d x +c \right )\right )-1196 C \left (\cos ^{4}\left (d x +c \right )\right )+432 B \left (\cos ^{3}\left (d x +c \right )\right )-816 C \left (\cos ^{3}\left (d x +c \right )\right )-636 B \left (\cos ^{2}\left (d x +c \right )\right )+1372 C \left (\cos ^{2}\left (d x +c \right )\right )-384 B \cos \left (d x +c \right )+768 C \cos \left (d x +c \right )-128 C \right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}}{192 d \sin \left (d x +c \right )^{5} \cos \left (d x +c \right ) a^{3}}\) | \(795\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.54, size = 557, normalized size = 2.58 \begin {gather*} \left [\frac {3 \, \sqrt {2} {\left ({\left (75 \, B - 163 \, C\right )} \cos \left (d x + c\right )^{4} + 3 \, {\left (75 \, B - 163 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (75 \, B - 163 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (75 \, B - 163 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {-a} \log \left (\frac {2 \, \sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, a \cos \left (d x + c\right )^{2} + 2 \, a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + 4 \, {\left ({\left (147 \, B - 299 \, C\right )} \cos \left (d x + c\right )^{3} + {\left (255 \, B - 503 \, C\right )} \cos \left (d x + c\right )^{2} + 32 \, {\left (3 \, B - 5 \, C\right )} \cos \left (d x + c\right ) + 32 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{192 \, {\left (a^{3} d \cos \left (d x + c\right )^{4} + 3 \, a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + a^{3} d \cos \left (d x + c\right )\right )}}, \frac {3 \, \sqrt {2} {\left ({\left (75 \, B - 163 \, C\right )} \cos \left (d x + c\right )^{4} + 3 \, {\left (75 \, B - 163 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (75 \, B - 163 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (75 \, B - 163 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) + 2 \, {\left ({\left (147 \, B - 299 \, C\right )} \cos \left (d x + c\right )^{3} + {\left (255 \, B - 503 \, C\right )} \cos \left (d x + c\right )^{2} + 32 \, {\left (3 \, B - 5 \, C\right )} \cos \left (d x + c\right ) + 32 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{96 \, {\left (a^{3} d \cos \left (d x + c\right )^{4} + 3 \, a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + a^{3} d \cos \left (d x + c\right )\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (B + C \sec {\left (c + d x \right )}\right ) \sec ^{4}{\left (c + d x \right )}}{\left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{\frac {5}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.62, size = 276, normalized size = 1.28 \begin {gather*} -\frac {\frac {{\left ({\left (3 \, {\left (\frac {2 \, \sqrt {2} {\left (B a^{5} - C a^{5}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}{a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )} + \frac {\sqrt {2} {\left (15 \, B a^{5} - 23 \, C a^{5}\right )}}{a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \frac {4 \, \sqrt {2} {\left (75 \, B a^{5} - 167 \, C a^{5}\right )}}{a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \frac {3 \, \sqrt {2} {\left (83 \, B a^{5} - 155 \, C a^{5}\right )}}{a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}} - \frac {3 \, \sqrt {2} {\left (75 \, B - 163 \, C\right )} \log \left ({\left | -\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \right |}\right )}{\sqrt {-a} a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}}{96 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{{\cos \left (c+d\,x\right )}^3\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________